﻿using System;

namespace WLCompiler.Helpers
{
    public static class PrintHelper
    {
        public static readonly string ErrorFormat = "Error on line: {0}. Cause of: {1}";

        public static void PrintError(int line, string message)
        {
            Console.WriteLine(string.Format(ErrorFormat, line, message));
        }

        public static void PrintAnalysisResult(bool hasSemanticErrors)
        {
            if (hasSemanticErrors)
            {
                Console.WriteLine("Semantic analysis failed.");
                return;
            }

            Console.WriteLine("Semantic analysis complited without errors.");
        }

        public static void PrintStartAnalysis()
        {
            Console.WriteLine("Starting semantic analysis...");
        }
    }
}
